package com.ehotting.edsta.mqbd.signal.client.handler;


import com.ehotting.edsta.mqbd.signal.api.bean.MqSignalTcpData;
import com.ehotting.mqbd.api.bean.MQDataAble;
import com.ehotting.mqbd.api.enums.DirectionEnum;
import com.ehotting.mqbd.api.enums.TopicEnum;
import com.ehotting.mqbd.api.bean.MqApplicationContext;
import com.ehotting.mqbd.core.logger.MqMsgLogger;
import com.ehotting.mqbd.core.mq.consumer.action.ConsumerResponseAction;
import com.ehotting.mqbd.core.manager.ModuleManager;
import com.ehotting.mqbd.core.sync.MqSyncFutureMapHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SIConsumerResponseAction extends ConsumerResponseAction {

    private static final Logger logger = LoggerFactory.getLogger(SIConsumerResponseAction.class);


    protected SISendUserServiceAble siSendUser;

    public SIConsumerResponseAction(MqSyncFutureMapHelper<MQDataAble> mqSyncFutureMapHelper,
                                    MqApplicationContext mqApplicationContext,
                                    TopicEnum topic,
                                    DirectionEnum direction,
                                    ModuleManager moduleManager, MqMsgLogger mqMsgLogger) {
        super(mqSyncFutureMapHelper, mqApplicationContext, topic, direction, moduleManager,mqMsgLogger);
    }

    public SIConsumerResponseAction(MqSyncFutureMapHelper<MQDataAble> mqSyncFutureMapHelper,
                                    MqApplicationContext mqApplicationContext,
                                    TopicEnum topic,
                                    DirectionEnum direction,
                                    String nodeIp,
                                    ModuleManager moduleManager, MqMsgLogger mqMsgLogger) {
        super(mqSyncFutureMapHelper, mqApplicationContext, topic, direction, nodeIp, moduleManager,mqMsgLogger);
    }

    @Override
    public void extInvoke(MQDataAble data) {
        siSendUser.sendToUser(data);
    }

    public void setSiSendUser(SISendUserServiceAble siSendUser) {
        this.siSendUser = siSendUser;
    }
}
